<?php
/**
 * $Id: cms_asset.php 131 2009-12-09 04:42:15Z shrey $
 * 
 * This file can not be redistributed to anyone without the permission of Giga Promoters
 * Copyright 2005 - 2008, Giga Promoters
 * 						  608 Aggarwal Cyber Plaza
 *						  Netaji Subhash Place, Delhi - 110034
 *						  www.gigapromoters.com
 * 
 *
 * This is parent of parent class of a controller and should not be edited ever without permission.
 * @version 			$Rev: 131 $
 * @lastModifiedBy		$LastChangedBy: shrey $
 * @lastChanged			$Date: 2009-12-09 10:12:15 +0530 (Wed, 09 Dec 2009) $
 * @copyright 			Giga Promoters (www.gigapromoters.com)
 * 
 */

/**
 * Asset Model - Attaches itself with a Model to support upload of multiple files
 * Asset can be refered to any image / video or any media file type. Any model requiring more than one file can use Asset Model
 * i.e Cafe hasMany Asset will allow uploading of any number of media for a particular cafe_id
 * Drawbacks: Allowed file types can not be specified as per model. Suppose a Cafe is needing only 'Image' type assets, while 'Reviews' require both 'Videos' and 'Image' type assets. 
 * Need to allow that using Configuration of plugin.
 *
 */
class CmsAsset extends AppModel {

	var $name = 'Asset';

	var $actsAs = array('Upload' => array(
	'field' => 'name',
	'allowedMime'=>array('video/*', 'application/octet-stream', 'image/jpeg', 'image/pjpeg', 'image/gif', 'image/png'),
	'allowedExt' => array('avi','mpg','mpeg','3gp','wmv', 'flv','jpg','jpeg','gif','png'),
	'empty'	=>false,
	));
}
?>